package com.haoran.dwz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.haoran.dwz.domain.entities.Role;
import com.haoran.dwz.repository.RoleRepository;
import com.haoran.dwz.service.RoleService;

@Service
public class RoleServiceImpl implements RoleService {
	@Autowired 
	private RoleRepository roleRepository;

	@Override
	public List<Role> findAll() {
		return roleRepository.findAll();
	}

	@Override
	public Role findByName(String name) {
		return roleRepository.findByName(name);
	}

	@Override
	public Role findByAuthority(String authority) {
		return roleRepository.findByAuthority(authority);
	}
}
